// 根据一直“键” 寻找“值”
const labelFindVal = (list, label) => {
	var value = "";
	list.map((item, index) => {
		if (item.label == label || item.name == label || item.text == label) {
			value = item.value
		}
	})
	return value;
}
// 根据值寻找键
const valFindLabel = (arrList, value) =>{
	var label = ''
	arrList.map((item, index) => {
		if (item.value == value) {
			item.label?label = item.label:label = item.name;
		}
	})
	return label;
}
// 验证手机号
const checkPhone = (phone) => {
	if (!(/^1[3456789]d{9}$/.test(phone))) {
		return false; //为false 手机号格式错误
	}
	return true//为false 手机号格式正确
}

export default {
	labelFindVal,
	checkPhone,
	valFindLabel
}
